package day02;

public class IFDemo {
    public static void main(String[] args) {
        int cup = 5;
        double price = 10.0d;
        double total = 0.0d;
        total = (cup/2)*price + (cup/2)*(price/2);
        if((cup & 1) == 1)
            total += price;

        System.out.println("总价："+total);
    }
}
